package com.app

object Hello {
  //函数的定义
  //()=>x+1
  var add=(x:Int,y:Int)=>x+y

  var m=()=>println("hello")


  //定义方法
  def myadd(x:Int,y:Int):Int={
    x+y
  }

  def xadd(x:Int,y:Int):Int=x+y
  //
  def x:String=x

  def mq(sa:String)=println(sa)


  def mul(x:Int,y:Int)(z:Int):Int=x*y*z



 /* def main(args: Array[String]): Unit = {

    val a = new A()
    a.setA("张三")
    a.setB(10)
    println(a)

    val a1 = new A("李四", 9)
    println(a1)

    X.xpringt("hello world")

  }*/

}
